import { hasPermission } from '@/directives/permission'
export const ARTICLE_COMMENT_COLUMNS = [
  {
    name: '评论内容',
    key: 'content',
    align: 'left',
    showOverflowTooltip: true,
    fixed: 'left'
  },
  {
    name: '评论者',
    key: 'nickname',
    width: 150,
    showOverflowTooltip: true
  },
  {
    name: '所属文章',
    key: 'articleTitle',
    showOverflowTooltip: true
  },
  {
    name: '所回复的评论',
    key: 'replyComment',
    showOverflowTooltip: true
  },
  {
    name: '被点赞次数',
    key: 'likeCounts',
    width: 130
  },
  {
    name: '评论时间',
    key: 'createTime',
    width: 200
  },
  {
    name: '操作',
    key: 'operate',
    fixed: 'right',
    width: 100,
    slot: 'operate',
    hidden: !hasPermission('article-comment-permission:btn:delete')
  }
].filter(o => !o.hidden)

export const CIRCLE_COMMENT_COLUMNS = [
  {
    name: '评论内容',
    key: 'content',
    align: 'left',
    showOverflowTooltip: true,
    fixed: 'left'
  },
  {
    name: '评论者',
    key: 'nickname',
    width: 150,
    showOverflowTooltip: true
  },
  {
    name: '所属友圈',
    key: 'circleContent',
    width: 300,
    showOverflowTooltip: true
  },
  {
    name: '友圈图片',
    key: 'picList',
    slot: 'picList',
    width: 160
  },
  {
    name: '所回复的评论',
    key: 'replyComment',
    showOverflowTooltip: true
  },
  {
    name: '被点赞次数',
    key: 'likeCounts',
    width: 130
  },
  {
    name: '评论时间',
    key: 'createTime',
    width: 200
  },
  {
    name: '操作',
    key: 'operate',
    fixed: 'right',
    width: 120,
    slot: 'operate',
    hidden: !hasPermission('circle-comment-permission:btn:delete')
  }
].filter(o => !o.hidden)
